window.addEventListener('scroll', function() {
  var imageContainers = document.querySelectorAll('.image-container');
  var windowHeight = window.innerHeight;

  imageContainers.forEach(function(container) {
    var containerTop = container.getBoundingClientRect().top;

    if (containerTop < windowHeight * 0.8) {
      container.classList.add('show');
    }
  });
});

window.addEventListener('DOMContentLoaded', function() {
  var imageItems = document.querySelectorAll('.image-item');

  imageItems.forEach(function(item) {
    item.addEventListener('mouseenter', function() {
      this.querySelector('img').style.transform = 'scale(1.2)';
    });

    item.addEventListener('mouseleave', function() {
      this.querySelector('img').style.transform = 'scale(1)';
    });
  });
});
